﻿using InfonavaEye.model.wjapi;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace InfonavaEye.model
{
    /// <summary>
    /// 数据上报实体
    /// </summary>
    public class ReportDTO
    {
        /// <summary>
        /// 使用的钉盒模型
        /// </summary>
        public BoxModel BoxModel { get; set; }

        /// <summary>
        /// 识别结果
        /// </summary>
        public List<OCRResult> OcrResults { get; set; }
    }

    /// <summary>
    /// 上报给上位机的最终数据
    /// </summary>
    public class ReportData {

        /// <summary>
        /// IE1设备编码 
        /// </summary>
        [JsonProperty("device_no")]
        public string DeviceNo { get; set; }

        [JsonProperty("order_no")]
        public string OrderNO { get; set; }

        /// <summary>
        /// 钉子数据
        /// </summary>
        [JsonProperty("data")]
        public List<ReportNailInfo> data { get; set; }
    }

    /// <summary>
    /// 钉子数据
    /// </summary>
    public class ReportNailInfo
    {
        /// <summary>
        /// 钉盒模板编号
        /// </summary>
        [JsonProperty("box_template_code")]
        public string BoxTemplateCode { get; set; }

        /// <summary>
        /// 钉子的位置信息
        /// </summary>
        [JsonProperty("nail_position")]
        public NailPosition NailPosition { get; set; }

        /// <summary>
        /// 镭射码 
        /// </summary>
        [JsonProperty("laser_code")]
        public string LaserCode { get; set; }

        /// <summary>
        /// 扫描图片的相对路径
        /// </summary>
        [JsonProperty("scan_img_url")]
        public string ScanImgUrl { get; set; }
    }

    public class NailPosition
    {    
        /// <summary>
        /// 区域编码
        /// </summary>
        [JsonProperty("segment")]
        public string Segment { get; set; }

        /// <summary>
        /// 行号
        /// </summary>
        [JsonProperty("row")]
        public int Row { get; set; }

        /// <summary>
        /// 列号
        /// </summary>
        [JsonProperty("column")]
        public int Column { get; set; }

    }

    public class SubmitCheckDataDTO
    {
        /// <summary>
        /// IE1设备编码 
        /// </summary>
        [JsonProperty("device_no")]
        public string DeviceNo { get; set; }

        [JsonProperty("order_no")]
        public string OrderNO { get; set; }
        /// <summary>
        /// 确认提交给后端服务器的核验数据
        /// </summary>
        [JsonProperty("confirm_result")]
        public List<ConfirmCheckResultParam> paramList { get; set; }

    }
}
